package com.cnswhy.cloud.server.core.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.cnswhy.cloud.common.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.cnswhy.cloud.common.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 
 * </p>
 *
 * @author cnswhy
 * @since 2020-10-16
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_spell_price")
@ApiModel(value = "SpellPrice", description = "")
@AllArgsConstructor
public class SpellPrice extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "")
    @Length(max = 100, message = "长度不能超过100")
    @TableField(value = "title", condition = LIKE)
    @Excel(name = "")
    private String title;

    /**
     * 拼团人数
     */
    @ApiModelProperty(value = "拼团人数")
    @TableField("success_people")
    @Excel(name = "拼团人数")
    private Integer successPeople;

    /**
     * 每天参团次数
     */
    @ApiModelProperty(value = "每天参团次数")
    @TableField("join_num")
    @Excel(name = "每天参团次数")
    private Integer joinNum;

    /**
     * 没有免中特权人数
     */
    @ApiModelProperty(value = "没有免中特权人数")
    @TableField("success_num")
    @Excel(name = "没有免中特权人数")
    private Integer successNum;

    /**
     * 赠送免中特权次数
     */
    @ApiModelProperty(value = "赠送免中特权次数")
    @TableField("fail_privilege")
    @Excel(name = "赠送免中特权次数")
    private Integer failPrivilege;

    /**
     * 1正常2禁用
     */
    @ApiModelProperty(value = "1正常2禁用")
    @TableField("status")
    @Excel(name = "1正常2禁用")
    private Integer status;

    /**
     * 拼团成功增加贡献值
     */
    @ApiModelProperty(value = "拼团成功增加贡献值")
    @TableField("contribution_value")
    @Excel(name = "拼团成功增加贡献值")
    private BigDecimal contributionValue;

    /**
     * 拼团成功为推荐人累加爱拼值
     */
    @ApiModelProperty(value = "拼团成功为推荐人累加爱拼值")
    @TableField("spell_value")
    @Excel(name = "拼团成功为推荐人累加爱拼值")
    private BigDecimal spellValue;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    @TableField("sort_order")
    @Excel(name = "排序")
    private Integer sortOrder;

    @ApiModelProperty(value = "")
    @TableField("participation_award")
    @Excel(name = "")
    private BigDecimal participationAward;

    /**
     * 新的拼团序列号
     */
    @ApiModelProperty(value = "新的拼团序列号")
    @Length(max = 32, message = "新的拼团序列号长度不能超过32")
    @TableField(value = "new_spell_order_id", condition = LIKE)
    @Excel(name = "新的拼团序列号")
    private String newSpellOrderId;
    /**
     * 拼购券商品兑换次数
     */
    @ApiModelProperty(value = "拼购券商品兑换次数")
    @TableField("shop_product_value")
    @Excel(name = "拼购券商品兑换次数")
    private Integer shopProductValue;

    @Builder
    public SpellPrice(Long id, LocalDateTime createTime, 
                    String title, Integer successPeople, Integer joinNum, Integer successNum, Integer failPrivilege, 
                    Integer status, BigDecimal contributionValue, BigDecimal spellValue, Integer sortOrder, Integer shopProductValue, BigDecimal participationAward, String newSpellOrderId) {
        this.id = id;
        this.createTime = createTime;
        this.title = title;
        this.successPeople = successPeople;
        this.joinNum = joinNum;
        this.successNum = successNum;
        this.failPrivilege = failPrivilege;
        this.status = status;
        this.contributionValue = contributionValue;
        this.spellValue = spellValue;
        this.sortOrder = sortOrder;
        this.participationAward = participationAward;
        this.newSpellOrderId = newSpellOrderId;
        this.shopProductValue = shopProductValue;
    }

}
